Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Test for Safari WebKit Force Touch Events #1613

Merged
merged 1 commit into from Nov 27, 2015

Conversation

KraigWalker
Copy link
Contributor

Will test if the currently defined flow of webkitmouseforce events from Apple is supported by the browser, and if the browser provides the WEBKIT_FORCE_AT_MOUSE_DOWN and WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN constants on the MouseEvent object.

https://developer.apple.com/library/prerelease/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Articles/RespondingtoForceTouchEventsfromJavaScript.html#//apple_ref/doc/uid/TP40016162-SW1

@modernizr-savage
Copy link

Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 116035a
Build details: https://travis-ci.org/modernizr-savage/Modernizr/builds/71570544

(Please note that this is a fully automated comment.)

@modernizr-savage
Copy link

Tests passed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED

Commit: 4cd0df2
Build details: https://travis-ci.org/modernizr-savage/Modernizr/builds/71571124

(Please note that this is a fully automated comment.)

@KraigWalker
Copy link
Contributor Author

See #1606

Modernizr.addTest('forcetouch', function() {

// Test if the browser supports the force touch event progression (see notes link)
if (!hasEvent('webkitmouseforcewillbegin', window) &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably generate these event names via Modernizr.prefixed so in the case they become unprefixed.

@KraigWalker
Copy link
Contributor Author

@ryanseddon thanks for looking into that. I'll be adding a revision over this with Modernizr.prefixed today.

@KraigWalker
Copy link
Contributor Author

Updated to use Modernizr.prefixed

@patrickkettner
Copy link
Member

@KraigWalker looks like you have committed with git's markers in it still. Wanna clean it up and squash it down to a single commit?

@patrickkettner
Copy link
Member

ping @KraigWalker

@KraigWalker
Copy link
Contributor Author

+1 #cantbelieveijustleftthiswhatwasithinking sorry! 😓

@patrickkettner
Copy link
Member

sorry, where you going to be able to update?

cheers!

@KraigWalker
Copy link
Contributor Author

Hey, Patrick. Most likely tonight. Going to dedicate some time to fix my broken PR (it seems to exist across two branches, which really isn't nice)

Sent from my iPhone

On 9 Nov 2015, at 17:10, patrick kettner notifications@github.com wrote:

sorry, where you going to be able to update?

cheers!


Reply to this email directly or view it on GitHub.

@patrickkettner
Copy link
Member

patrickkettner commented Nov 11, 2015 via email

@KraigWalker KraigWalker force-pushed the forcetouch branch 3 times, most recently from 1618417 to d2153d3 Compare November 12, 2015 11:12
@KraigWalker
Copy link
Contributor Author

That's it sorted now.

return true;
} else {
return false;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should just be return MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN && MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN

@patrickkettner
Copy link
Member

sorry, couple more nits then we will be all good and merged

@KraigWalker
Copy link
Contributor Author

No problem. Thanks for reviewing it.

On 16 Nov 2015, at 22:55, patrick kettner notifications@github.com wrote:

sorry, couple more nits then we will be all good and merged


Reply to this email directly or view it on GitHub.

Adds a feature detect for mouse force related events, and whether force values can
be read from the MouseEvent object.
patrickkettner added a commit that referenced this pull request Nov 27, 2015
Add Test for Safari WebKit Force Touch Events
@patrickkettner patrickkettner merged commit 9743105 into Modernizr:master Nov 27, 2015
@patrickkettner
Copy link
Member

cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants